var express = require('express');
var cheerio = require('cheerio');
var superagent = require('superagent')

var app = express();

app.get('/', (req, res, next) => {
    superagent.get('https://m.cudaojia.com/distt/welfareAT02/private/G/G026/index01.html?business=money-1&appkey=45cc2d9c0d144632b96f7a231e48117f&uid=91886736A27A1BD1F5B2F1174D194B07&activityid=21388&supportPc=1')
    .end((err, sres) => {
        if (err) {
            return next(err)
        }

        var $ = cheerio.load(sres.text)
        var items = $('.myMoney .money').text()
        console.log(items)
        res.send(items)

    })
})
app.listen(3000, function (req, res) {
    console.log('app is running at port 3000');
  });
  